<?php
/**
 * Created by PhpStorm.
 * User: xuke
 * Date: 16/7/13
 * Time: 下午3:18
 */

namespace App\Http\Model;
use Illuminate\Foundation\Auth\User as Authenticatable;

class Admin extends Authenticatable
{
    protected $primaryKey = 'admin_id';
    protected $table = 'admin';
    public $timestamps = false;


    public function role()
    {
        return $this->hasOne(Roles::class, 'role_id', 'role_id');
    }

    public function isSuper()
    {
        return $this->role_id == 0 ? true :false;
    }


}